[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 memset()                Initialize Buffer

 #include   <mem.h>                      Required for declarations only
 #include   <string.h>                   Use either string.h or memory.h

 void       *memset(dest,ch,cnt);
 void       *dest;                       Pointer to destination
 int        ch;                          Character to set
 size_t     cnt;                         Number of characters

    memset() sets the first 'cnt' bytes of the buffer 'dest' to the
    character 'ch'.

       Returns:     A pointer to the beginning of 'dest'.

   -------------------------------- Example ---------------------------------

    The following statements initialize the buffer 'buff' to 0.

           #include <mem.h>

           char buff[128];

           main()
           {
               memset(buff,'\0',128);
           }


See Also: memccpy() memchr() memcmp() memcpy()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson